<%= ::TimeAgo.created_or_edited(local_assigns[:data]) %>
<% if local_assigns[:data].category.count > 0 %>
  <br>
  <strong>
    <%= t('categories.label', count: local_assigns[:data].category.count) %>
  </strong>
  <% local_assigns[:data].category.each do |item| %>
    <span class="notification_wrapper">
      <span class="tip_notifications_button link_style"><%= Category.where(id: item).first.name %></span><% if local_assigns[:data].category.last != item %><%= ', ' %><% end %>
      <%= render :partial => '/notifications/preview', locals: { data: Category.where(id: item).first, edit: edit_category_path(item) } %>
    </span>
  <% end %>
<% end %>

<% if local_assigns[:data].class.name == 'Moment' && local_assigns[:data].mood.count > 0 %>
  <br>
  <strong>
    <%= t('moods.label', count: local_assigns[:data].mood.count) %>
  </strong>
  <% local_assigns[:data].mood.each do |item| %>
    <span class="notification_wrapper">
      <span class="tip_notifications_button link_style"><%= Mood.where(id: item).first.name %></span><% if local_assigns[:data].mood.last != item %><%= ', ' %><% end %>
      <%= render :partial => '/notifications/preview', locals: { data: Mood.where(id: item).first, edit: edit_mood_path(item) } %>
    </span>
  <% end %>
<% end %>

<% if local_assigns[:data].class.name == 'Moment' && local_assigns[:data].strategy.count > 0 && local_assigns[:show_strategies] %>
  <br>
  <strong>
    <%= t('strategies.label', count: local_assigns[:data].strategy.count) %>
  </strong>
  <% local_assigns[:data].strategy.each do |item| %>
    <span class="notification_wrapper">
      <span class="tip_notifications_button link_style"><%= Strategy.where(id: item).first.name %></span><% if local_assigns[:data].strategy.last != item %><%= ', ' %><% end %>
      <%= render :partial => '/notifications/preview', locals: { data: Strategy.where(id: item).first, edit: edit_strategy_path(item) } %>
    </span>
  <% end %>
<% end %>

<% if local_assigns[:home] %>
  <div class="spacer"></div>
  <% if local_assigns[:data].class.name == 'Moment' %>
  <%= strip_tags(local_assigns[:data].why[0..200]) %>
  <% if local_assigns[:data].why.length >= 200 %>
    <%= t('ellipsis') %>
  <% end %>
  <% elsif local_assigns[:data].class.name == 'Strategy' %>
  <%= strip_tags(local_assigns[:data].description[0..200]) %>
  <% if local_assigns[:data].description.length >= 200 %>
    <%= t('ellipsis') %>
  <% end %>
  <% end %>
<% end %>

<% if local_assigns[:class_name] %>
<br>
<div class="align_right subtle class_name">
<% if local_assigns[:data].class.name == 'Moment' %>
  <%= t('moments.singular') %>
<% elsif local_assigns[:data].class.name == 'Strategy' %>
  <%= t('strategies.singular') %>
<% end %>
</div>
<% end %>

<div class="clear"></div>
